﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Data_Objects.Implementation
{
  public static  class SQLUtility
    {
        private static string tableName;
        private static string proceduresInsert;

        public static string ProceduresInsert
        {
            get { return SQLUtility.proceduresInsert; }
            set { SQLUtility.proceduresInsert = value; }
        }
        private static string proceduresUpdate;

        public static string ProceduresUpdate
        {
            get { return SQLUtility.proceduresUpdate; }
            set { SQLUtility.proceduresUpdate = value; }
        }
        private static string proceduresDelete;

        public static string ProceduresDelete
        {
            get { return SQLUtility.proceduresDelete; }
            set { SQLUtility.proceduresDelete = value; }
        }
        private static string proceduresGetAll;

        public static string ProceduresGetAll
        {
            get { return SQLUtility.proceduresGetAll; }
            set { SQLUtility.proceduresGetAll = value; }
        }
        private static string proceduresGetByID;

        public static string ProceduresGetByID
        {
            get { return SQLUtility.proceduresGetByID; }
            set { SQLUtility.proceduresGetByID = value; }
        }

        public static string TableName
        {
            get { return tableName; }
            set
            {
                tableName = value;
                ProceduresGetByID = "usp_Select" + tableName;
                ProceduresGetAll = "usp_Select" + tableName + "sAll";
                ProceduresInsert = "usp_Insert" + tableName;
                ProceduresUpdate = "usp_Update" + tableName;
                ProceduresDelete = "usp_Delete" + tableName;
            }
        } 
    }
}
